import Vue from "vue";
import musicContent from "../../components/musicContent";
import VueRouter from "vue-router";
Vue.use(VueRouter);
import mineMusic from "../../components/mineMusic.vue";
import discoverMusic from "../../components/musicFind.vue";
import musicPlay from "../../components/musicPlay.vue";
import songerMusicl from "../../components/songermusicl.vue";
import songerMusicl2 from "../../components/songermusicl2.vue";
import songerMusicl3 from "../../components/songermusicl3.vue";
import musicSearch from "../../components/musicsearch.vue";
import setting from "../../components/setting.vue";
export default new VueRouter({
	// mode:"history",//路由模式，让你的url看起来更好看，更像一个真正的url地址
	routes: [{
			path: "/",
			component: musicContent,
			children: [{
					// 当 /user/:id/profile 匹配成功，
					// UserProfile 会被渲染在 User 的 <router-view> 中
					path: '/',
					component: mineMusic
				},
				{
					path: '/child2',
					component: discoverMusic
				},
				{
					path: "/play",
					components: {playname:musicPlay},
				},
				{
					path: "/songerM",
					components: {songerMusic:songerMusicl},
				},
				{
					path: "/songerM2",
					components: {songerMusic2:songerMusicl2},
				},
				{
					path: "/songerM3",
					components: {songerMusic3:songerMusicl3},
				},
				{
					path: "/Search",
					components: {musicSearch:musicSearch},
				},
				{
					path: "/seting",
					components: {seting:setting},
				},
			]
		},

		//默认路由的写法 "/"
		//可以通过动态路由把一定数据信息传递到所路由的组件里面
		// {path:"",component:,props:true}
	]
})